package controller

import (
	"gddgame.cc/galaxy/common/api/aliyun_api"
	"gddgame.cc/galaxy/utils/cache"
	"gddgame.cc/galaxy/utils/def"
)

var (
	wrap   *cache.Wrap
	client *aliyun_api.Client

	userExpire = 3600
)

func InitUser(context def.Context, factory def.StoreFactory) error {
	c := factory.Cache("core/user")
	c.Expire(userExpire)
	wrap = cache.NewWrap(c)
	client = aliyun_api.NewClient(context)
	return nil
}
